/*
 * <h3>Title:wheel-spring-boot-web-starter系统</h3>
 * <p>Copyright (c) 2019, wnfbx@163.com. All rights reserved.</p>
 * @author wnfbx@163.com
 */
package com.wheel.autoconfigure.web.mvc.rest;

import org.springframework.boot.context.properties.ConfigurationProperties;

import java.net.Proxy;

/**
 * <dt>Description:RestTemplateProperties</dt>
 * <dd>配置属性</dd>
 *
 * @author wnfbx@163.com
 * @version 1.0 <i>2019年6月6日 下午2:58:30</i>
 * @since jdk1.7+
 */
@ConfigurationProperties(prefix = "w.spring.rest-template")
public class RestTemplateProperties {

    /**
     * readTimeout: 读取超时
     */
    private Integer readTimeout = 10000;

    /**
     * connectionTimeout: 连接超时
     */
    private Integer connectionTimeout = 3000;

    /**
     * proxyHost: 不为空时开启代理访问
     */
    private String proxyHost = null;

    private Integer proxyPort = 0;

    private Proxy.Type proxyType = Proxy.Type.HTTP;
    /**
     * 允许ssl安全检查
     */
    private boolean enableSslCheck = false;
    /**
     * 返回结果字符集
     */
    private String charset = "UTF-8";

    public String getCharset() {
        return charset;
    }

    public void setCharset(String charset) {
        this.charset = charset;
    }

    public boolean isEnableSslCheck() {
        return enableSslCheck;
    }

    public void setEnableSslCheck(boolean enableSslCheck) {
        this.enableSslCheck = enableSslCheck;
    }

    public Proxy.Type getProxyType() {
        return proxyType;
    }

    public void setProxyType(Proxy.Type proxyType) {
        this.proxyType = proxyType;
    }

    /**
     * @return the proxyHost
     */
    public String getProxyHost() {
        return proxyHost;
    }

    /**
     * @param proxyHost the proxyHost to set
     */
    public void setProxyHost(String proxyHost) {
        this.proxyHost = proxyHost;
    }

    /**
     * @return the proxyPort
     */
    public Integer getProxyPort() {
        return proxyPort;
    }

    /**
     * @param proxyPort the proxyPort to set
     */
    public void setProxyPort(Integer proxyPort) {
        this.proxyPort = proxyPort;
    }

    /**
     * @return the readTimeout
     */
    public Integer getReadTimeout() {
        return readTimeout;
    }

    /**
     * @param readTimeout the readTimeout to set
     */
    public void setReadTimeout(Integer readTimeout) {
        this.readTimeout = readTimeout;
    }

    /**
     * @return the connectionTimeout
     */
    public Integer getConnectionTimeout() {
        return connectionTimeout;
    }

    /**
     * @param connectionTimeout the connectionTimeout to set
     */
    public void setConnectionTimeout(Integer connectionTimeout) {
        this.connectionTimeout = connectionTimeout;
    }

}